#pragma once

#include <memory>
#include <string>
#include <wrl.h>
#include <d2d1_1.h>

namespace WinDirectUI
{
    class DrawingContext;

    class SampleOverlay
    {
    public:
        DrawingContext* m_dc;
        SampleOverlay(DrawingContext* dc);

        void CreateDeviceDependentResources();

        void CreateWindowSizeDependentResources();

        void ReleaseDeviceDependentResources();
        
        void Render();

    private:

        Microsoft::WRL::ComPtr<ID2D1SolidColorBrush>    m_whiteBrush;
        Microsoft::WRL::ComPtr<ID2D1DrawingStateBlock>  m_stateBlock;

        Microsoft::WRL::ComPtr<ID2D1Bitmap>             m_logoBitmap;
        Microsoft::WRL::ComPtr<IDWriteTextLayout>       m_textLayout;

        UINT                                            m_idIncrement;
        bool                                            m_drawOverlay;
        std::wstring                                    m_caption;
        float                                           m_padding;
        float                                           m_textVerticalOffset;
        D2D1_SIZE_F                                     m_logoSize;
        float                                           m_overlayWidth;
    };
}